import service from "./request"

//课程管理
export function courseGetPage(params, page) {
    return service({
        url: '/admin/course/page/' + page,
        method: 'get',
        params: params
    })
}


// 课程页数
export function courseGetPageCount(params) {
    return service({
        url: '/admin/course/page/count',
        method: 'get',
        params: params
    })
}

// 课程添加
export function courseAdd(data) {
    return service({
        url: '/admin/course',
        method: 'post',
        data: data
    })
}
//删除
export function courseDelete(id) {
    return service({
        url: '/admin/course/' + id,
        method: 'delete',
    })
}
//教师姓名
export function teacherName() {
    return service({
        url: "/admin/teacher/names",
        method: "get"
    })
}
//根据id
export function courseInfo(id) {
    return service({
        url: '/admin/course/' + id,
        method: 'get',
    })
}
//编辑
export function courseEdit(data) {
    return service({
        url: '/admin/course',
        method: 'put',
        data: data
    })
}